<div style="padding: 30px;" class="layui-form layui-form-pane">

    <div class="layui-form-item">
        <label class="layui-form-label"><i class="required-color">*</i> 消息名称：</label>
        <div class="layui-input-inline seller-inline-4">
            <input type="text" name="name" value="{$data.name}" required lay-verify="required" placeholder="请输入消息名称(关键字)" autocomplete="off" class="layui-input">
            <input type="hidden" name="id" value="{$data.id}">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">关注回复：</label>
        <div class="layui-input-inline seller-inline-4">
            <input type="checkbox" value="1" {if condition="$data.is_attention eq '1' "}checked = "" {/if} name="is_attention" lay-skin="switch" lay-filter="switchTest" title="开关"><div class="layui-unselect layui-form-switch layui-form-onswitch" lay-skin="_switch"><em></em><i></i></div>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">默认回复：</label>
        <div class="layui-input-inline seller-inline-4">
            <input type="checkbox" value="1" name="is_default" {if condition="$data.is_default eq '1' "}checked = "" {/if} lay-skin="switch" lay-filter="switchTest" title="开关"><div class="layui-unselect layui-form-switch layui-form-onswitch" lay-skin="_switch"><em></em><i></i></div>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">禁用：</label>
        <div class="layui-input-inline seller-inline-4">
            <input type="checkbox" value="2" name="enable" {if condition="$data.enable eq '2' "}checked = "" {/if}  lay-skin="switch" lay-filter="switchTest" title="开关"><div class="layui-unselect layui-form-switch layui-form-onswitch" lay-skin="_switch"><em></em><i></i></div>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label"><i class="required-color">*</i> 消息类型：</label>
        <div class="layui-input-inline seller-inline-4">
            <select name="type" lay-filter="message-type">
                <option value="1" {if condition="$data.type eq '1' "}selected = "" {/if} >文字消息</option>
                <option value="3" {if condition="$data.type eq '3' "}selected = "" {/if} >图文消息</option>
            </select>
        </div>
    </div>

    <div class="message-type keyword"  {if condition="$data.type neq '1' "} style="display: none;" {/if}>
        <div class="layui-form-item">
            <label class="layui-form-label">消息内容：</label>
            <div class="layui-input-inline seller-inline-4">
                <textarea class="layui-textarea" name="params[content]">{$data.params.content}</textarea>
            </div>
        </div>
    </div>

    <div class="message-type image-text" {if condition="$data.type neq '3' "} style="display: none;" {/if}>
        <div class="layui-form-item" style="text-align: center;">
            <div class="layui-form-mid layui-word-aux" style="color:#FF5722 !important;float: none;">请稍后进入图文编辑页面继续编辑，否则图文消息不生效</div>
        </div>
    </div>

    <button class="layui-btn layui-btn-fluid save-message" lay-submit lay-filter="add-message">保存</button>
<div class="layui-form-mid layui-word-aux">消息名称请勿填写“客服”，当用户输入“客服”时，将消息自动转发至客服系统</div>

</div>

<script>
    layui.use('form', function(){
        layui.form.render();
    });
</script>